#!/bin/bash
ind=0
for arg in *.mat
do
  ind=`expr $ind + 1`
  echo $arg
  echo $ind
  mv $arg f$ind.mat
done